import request from '@/utils/request'

export const getAnn = (data: any) =>
  request({
    url: '/admin/announcement',
    method: 'get',
    data
  })

  export const addAnn = (data: any) =>
  request({
    url: '/admin/announcement',
    method: 'post',
    data
  })

  export const update = (data: any) =>
  request({
    url: '/admin/announcement',
    method: 'put',
    data
  })

  export const deleteAnn = (id: number) =>
     request({ 
        url: `/admin/deleteannouncement/${id}`,
        method: 'post',
    })

